<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>嵌入字符串和模板字符串</title>
</head>
<body>

<h4>反单引号，用来定义字符串模板</h4>
<p>嵌套{}里可以插入js任何表达式，还可以是对象，数组和函数</p>
<script>
    let name="Alice";
    let mystr1="Hello ${name}!";
    let mystr2=`Hello ${name} `;
    console.log(mystr1);//Hello ${name}!
    console.log(mystr2);//Hello Alice

    var html=`<ul><li>1</li><li>2</li><li>1</li><li>2</li></ul>`;
    document.write(html)
</script>
</body>
</html>
